package com.tsinghua.discharge.dao;

import org.apache.ibatis.annotations.Mapper;
import com.tsinghua.discharge.model.DataDate;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DataDateMapper {
    int insert(DataDate dataDate);

    Integer selectbyYear(@Param("year")String year,@Param("userId")int userId);

    List<Integer> selectbyRange(@Param("start_year")String start_year,@Param("end_year")String end_year,@Param("userId")int userId);

    String selectbyYearId(@Param("dateid")Integer dateid,@Param("userId")int userId);

    List<String> selectBulk(int userid);

    DataDate selectByYearAndMonthAndDay(@Param("year") String year,@Param("month") String month,@Param("day") String day,@Param("userId") Integer userId);

    DataDate selectByYearAndMonth(@Param("year") String year,@Param("month") String month,@Param("userId") Integer userId);

    DataDate selectByYear(@Param("year") String year,@Param("userId") Integer userId);
    Integer deleteByUser(@Param("userId") Integer userId);
}
